//package customermanagesystem.demo.aopBean;
//
//import customermanagesystem.demo.aopDao.Com;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Component;
//
//@Component
//public class ComImpl implements Com {
//    @Autowired
//    MyComAspect aspect;
//    public int add(int x, int y) {
//        //before()
////        System.out.println("方法名称为 add,参数为:"+x+","+y);
////        MyComAspect aspect = new MyComAspect();
////        aspect.before( "add",x,y);
//        int result = x+y;
////        aspect.after("add",result);
//
//        //after()
////        System.out.println("add结果为"+result);
//        return result;
//    }
//
//
//    public int sub(int x, int y) {
////        System.out.println("方法名称为 sub,参数为:"+x+","+y);
//        int result = x-y;
////        System.out.println("sub结果为："+result);
//        return result;
//    }
//
//    public int mul(int x, int y) {
//        System.out.println("方法名称为 mul,参数为:"+x+","+y);
//        int result = x*y;
//        System.out.println("结果为："+result);
//        return result;
//    }
//
//    public int div(int x, int y) {
//        System.out.println("方法名称为 div,参数为:"+x+","+y);
//        try {
//            int result = x / y;
//        }catch ( Exception e) {
//            System.out.println("异常！");
//        e.printStackTrace();
//        }
////        System.out.println("结果为："+result);
//        return x/y;
//    }
//}
//
